package com.itheima;

import java.security.PublicKey;

public abstract class Car {
    private String brand;
    private String color;
    private double price;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Car(String brand, String color, double price) {
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    public Car() {
    }

    public abstract void dirver();
}

class Audi extends Car {
    public Audi() {
    }

    @Override
    public void dirver() {
        System.out.println("开着奥迪吃烧烤去");
    }

    public Audi(String brand, String color, double price) {
        super(brand, color, price);
    }

}

class Alto extends Car {
    public Alto() {
    }

    public Alto(String brand, String color, double price) {
        super(brand, color, price);
    }

    @Override
    public void dirver() {
        System.out.println("开着奥托也吃烧烤去");
    }
}